# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pythem
pkgver=454.e4fcb8a
pkgrel=5
pkgdesc='Python2 penetration testing framework.'
groups=('blackarch' 'blackarch-scanner' 'blackarch-sniffer' 'blackarch-recon'
        'blackarch-cracker' 'blackarch-webapp')
arch=('any')
url='https://github.com/m4n3dw0lf/PytheM'
license=('GPL3')
depends=('python2' 'python2-praw' 'python2-pysqlite' 'python2-mechanize'
         'python2-pyttsx' 'python2-netaddr' 'python2-pygeoip' 'python2-paramiko'
         'python2-netfilterqueue' 'python2-speechrecognition' 'python2-scapy'
         'python2-termcolor' 'python2-ropper' 'python2-psutil' 'espeak-ng')
makedepends=('git' 'python2-setuptools')
source=("$pkgname::git+https://github.com/m4n3dw0lf/PytheM.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python2 setup.py build
}

package() {
  cd $pkgname

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

